00001 /////////////////////////////////////////////////////////////////////////////// 00002 /// @file deSurface_priv.hpp 00003 /// 00004 /// @brief Surface attributes for rendering with 00005 /// 00006 /// @author Assassin 00007 /// 00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the 00009 /// contents of this file is subject to the Destiny3D Member License which 00010 /// can be found at http://www.destiny3d.com. Any other usage is prohibited. 00011 /// 00012 /// This file is distributed "AS IS" without warranty of any kind. Novus 00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file 00014 /// for any particular purpose. 00015 /// 00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved. 00017 /// 00018 /// <hr> 00019 /// Change History 00020 /// <hr> 00021 /// 00022 /// @date June 2003 00023 /// @author Assassin 00024 /// @remarks Creation 00025 /// 00026 /////////////////////////////////////////////////////////////////////////////// 00027 00028 #ifndef DESURFACE_PRIV_HPP 00029 #define DESURFACE_PRIV_HPP 00030 00031 #include "deSurface.hpp" 00032 #include "deWorld_Helper.hpp" 00033 #include "deFunctors.hpp" 00034 #include "deHash.hpp" 00035 #include "deString.hpp" 00036 00037 class deSurface : public deWorldObject, virtual public IdeSurface 00038 { 00039 protected: 00040 ~deSurface(); 00041 public: 00042 deSurface(); 00043 00044 WorldObjectClassDef; 00045 void* GetWOInterface(long interface_id); 00046 deBoolean DeSerializeLoad(); 00047 00048 // begin <new> 00049 /* 00050 public: 00051 IdeShader* 00052 00053 private: 00054 IdeShader* 00055 */ 00056 // end <new> 00057 00058 // begin <deprecated> 00059 public: 00060 void SetRenderTexture(IdeRenderTexture* pRT); 00061 void SetRenderMaterial(IdeRenderMaterial* pRM); 00062 IdeRenderTexture* GetRenderTexture(); 00063 IdeRenderMaterial* GetRenderMaterial(); 00064 private: 00065 IdeRenderTexture* m_RenderTexture; 00066 IdeRenderMaterial* m_RenderMaterial; 00067 deIDPair m_TextureID, m_MaterialID; 00068 // end <deprecated> 00069 }; 00070 00071 class deTextureSet : virtual public IdeTextureSet, public deRefCountBase//, public deWorldObject 00072 { 00073 protected: 00074 ~deTextureSet(); 00075 public: 00076 deTextureSet(); 00077 /* 00078 WorldObjectClassDef; 00079 void* GetWOInterface(long interface_id); 00080 deBoolean DeSerializeLoad(); 00081 */ 00082 u32 GetNumTextures() const; 00083 const char* GetNameByIndex(s32 index) const; 00084 s32 GetIndexByName(const char* name) const; 00085 IdeBitmapProxy* GetTextureByIndex(s32 index) const; 00086 IdeBitmapProxy* GetTextureByName(const char* name) const; 00087 00088 deBoolean AddTextureName(const char* name, s32* index); 00089 deBoolean SetTextureByIndex(s32 index, IdeBitmapProxy* tex); 00090 deBoolean SetTextureByName(const char* name, IdeBitmapProxy* tex); 00091 00092 IdeTextureSet* CloneTextureSet(const char** names); 00093 00094 static void Test(); 00095 00096 protected: 00097 deBoolean AddTextureName(deString2 str, s32* index); 00098 s32 GetIndexByName(deString2 str) const; 00099 00100 private: 00101 deTHashFunctor<s32, deString2> m_NameIndices; 00102 deTArray<IdeBitmapProxy*> m_Bitmaps; 00103 deTArray<deString2> m_Names; 00104 }; 00105 00106 #endif
1.3-rc3